package com.campus.common.enumUtil;

public enum ResultCodeEnum {
    SUCCESS(200,"success"),
    ERROR(201,"error"),
    SYSTEM_ERROR(500,"服务器端异常！"),
    DATABASE_ERROR(501,"数据库出错"),
    ILLEGAL_OPERATION(501,"非法操作"),
    NOTLOGIN(504,"token无效，请重新登录！"),
    USERNAME_ERROR(500,"用户名错误！"),
    USERNAME_USED(500,"用户名已被使用！"),
    USER_ERROR(500,"用户不存在！"),
    PASSWORD_ERROR(500,"密码错误！"),
    CAPTCHA_ERROR(500,"验证码错误！"),
    EMAIL_USED(500,"邮箱已被使用！"),
    LOGIN_EMAIL_ERROR(500,"邮箱未绑定！"),
    PASSWORD_MISMATCH(500, "密码不一致");



    private final Integer code;

    private final String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
